{
 "cells": [
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-11-17T08:59:59.166633Z",
     "start_time": "2025-11-17T08:59:59.146641Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from pandas import period_range\n",
    "from pandas._libs.tslibs.offsets import Week, Hour\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "date_offset = Week(2)+Hour(10)\n",
    "pd.date_range('2023/1/1','2023/1/31',freq=date_offset)\n",
    "str_list =['2021','2022','2023']\n",
    "pd.PeriodIndex(str_list,freq='Y-DEC')\n",
    "period_index = pd.date_range('2023/1/1',periods=30)\n",
    "period_ser = pd.Series(np.arange(30),period_index)\n",
    "\n"
   ],
   "id": "ba4bb268672f643b",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2023-01-01     0\n",
       "2023-01-02     1\n",
       "2023-01-03     2\n",
       "2023-01-04     3\n",
       "2023-01-05     4\n",
       "2023-01-06     5\n",
       "2023-01-07     6\n",
       "2023-01-08     7\n",
       "2023-01-09     8\n",
       "2023-01-10     9\n",
       "2023-01-11    10\n",
       "2023-01-12    11\n",
       "2023-01-13    12\n",
       "2023-01-14    13\n",
       "2023-01-15    14\n",
       "2023-01-16    15\n",
       "2023-01-17    16\n",
       "2023-01-18    17\n",
       "2023-01-19    18\n",
       "2023-01-20    19\n",
       "2023-01-21    20\n",
       "2023-01-22    21\n",
       "2023-01-23    22\n",
       "2023-01-24    23\n",
       "2023-01-25    24\n",
       "2023-01-26    25\n",
       "2023-01-27    26\n",
       "2023-01-28    27\n",
       "2023-01-29    28\n",
       "2023-01-30    29\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 32
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
